﻿<ctls:BusyButton
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	mc:Ignorable="d"
	x:Class="uhul.Controls.AppButon"
  xmlns:ctls="clr-namespace:uhul.Controls"
	d:DesignWidth="260" d:DesignHeight="260"
>
  
  <ctls:BusyButton.Resources>
    
    <!--style for app tab button-->
    <Style x:Key="UhulButton1" TargetType="ctls:BusyButton">
      <Setter Property="Template">
        <Setter.Value>
          <ControlTemplate TargetType="ctls:BusyButton">
            <Grid Margin="0">

          		<VisualStateManager.VisualStateGroups>
          			<VisualStateGroup x:Name="CommonStates">

          				<VisualState x:Name="Normal"/>

          				<VisualState x:Name="MouseOver">
                   
          					<Storyboard>
          						<ColorAnimation Duration="0" To="#ffC1FfcC" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="kresbaTlacikta" d:IsOptimized="True"/>
          					</Storyboard>
                   
          				</VisualState>
          				<VisualState x:Name="Pressed"/>
          				<VisualState x:Name="Disabled"/>

          			</VisualStateGroup>

          			<VisualStateGroup x:Name="FocusStates">

          				<VisualState x:Name="Focused"/>

          				<VisualState x:Name="Unfocused"/>

          			</VisualStateGroup>

          			<VisualStateGroup x:Name="BusyStates">
          				<VisualState x:Name="Free">
          					<!--<Storyboard>
          						<DoubleAnimation 
          							Duration="0" To="0"
          							Storyboard.TargetProperty="(UIElement.Opacity)"
          							Storyboard.TargetName="progressIndicator" d:IsOptimized="True"
											/>
										</Storyboard>-->		
									</VisualState>
          				<VisualState x:Name="Busy">
          					<Storyboard RepeatBehavior="Forever">
          						<DoubleAnimation 
          							Duration="0" To="1"
          							Storyboard.TargetProperty="(UIElement.Opacity)"
          							Storyboard.TargetName="progressIndicator" d:IsOptimized="True"
											/>
          						<DoubleAnimation Duration="0:0:2"
											To="360" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.Rotation)"
											Storyboard.TargetName="progressIndicator" d:IsOptimized="True"/>
          					</Storyboard>
          				</VisualState>
          			</VisualStateGroup>

          		</VisualStateManager.VisualStateGroups>
          		<Viewbox>
          			<Grid Height="220" Width="220">
          				<Ellipse Fill="#f0ffffff" Margin="0"/>
          				<Ellipse Margin="10" Opacity="0.99" Stroke="#FF3D3D3D" StrokeThickness="9" x:Name="kresbaTlacikta" Fill="#00ffffff"/>
          				<!--<Viewbox Margin="55,29,57,33">
          					<Grid>
          						<Grid.Projection>
          							<PlaneProjection/>
          						</Grid.Projection>
          						<Ellipse x:Name="BilyKruh" Stroke="#FF005928" StrokeThickness="2" Fill="White" Margin="15,37,15,41"/>
          						<Path x:Name="Trojuhelnik" Stretch="Fill"  Data="M6.6585879,152.2291 L64.289406,1.3777305 L118.70578,142.58569 L85.412636,170.59776 C85.412636,170.59776 77.835678,159.11705 59.696892,157.73941Z" StrokeThickness="2" Margin="3,0,6,0" UseLayoutRounding="False">
          							<Path.Fill>
          								<LinearGradientBrush EndPoint="0,0" StartPoint="1,0">
          									<GradientStop Color="#FF023318" Offset="0"/>
          									<GradientStop Color="#FF35A768" Offset="0.987"/>
          								</LinearGradientBrush>
          							</Path.Fill>
          						</Path>
          						<Rectangle x:Name="RamecekUhul" Stroke="#FF005928" RadiusX="7" RadiusY="7" StrokeThickness="2" Fill="White" Margin="0,71,0,75" />
          						<Path x:Name="RamecekBrandys" Stretch="Fill" Stroke="#FF005928"   Data="M100.17116,0.5 L113.76623,7.1860962 L113.49232,7.9637604 C105.08035,30.93792 83.021461,47.333748 57.133114,47.333748 C31.244766,47.333748 9.1858711,30.93792 0.77390099,7.9637604 L0.5,7.1861038 L14.09507,0.5 L14.156227,0.71537018 C19.853743,19.033447 36.940201,32.33374 57.133114,32.33374 C77.326019,32.33374 94.412483,19.033447 100.11,0.71537018 z" StrokeThickness="2" Fill="White" Margin="4,96,4,26" UseLayoutRounding="False"/>
          						<TextBlock x:Name="TextUhul" Text="ÚHÚL" Foreground="#FF005928" FontSize="16" TextAlignment="Center" FontWeight="Bold" Padding="0,2,0,0" Margin="0,71,0,75" />
          					</Grid>
          				</Viewbox>-->
                  <ctls:AppLogo Margin="55,29,57,33"/>
                  
          				<Ellipse
          					x:Name="progressIndicator"
          					HorizontalAlignment="Right" VerticalAlignment="Bottom"
          					Height="65" Width="65" Margin="0,0,10,10"
          					StrokeThickness="2"
          					RenderTransformOrigin="-0.546,-0.577"
          					Opacity="0"
									>
          					<Ellipse.RenderTransform>
          						<CompositeTransform/>
          					</Ellipse.RenderTransform>
          					<Ellipse.Fill>
          						<RadialGradientBrush>
          							<GradientStop Color="White" Offset="0.374"/>
          							<GradientStop Color="Transparent" Offset="1"/>
          						</RadialGradientBrush>
          					</Ellipse.Fill>
          				</Ellipse>
          			</Grid>
          		</Viewbox>
          	</Grid>
          </ControlTemplate>
        </Setter.Value>
      </Setter>
    </Style>

  </ctls:BusyButton.Resources>

  <ctls:BusyButton.Style>
    <StaticResource ResourceKey="UhulButton1"/>
  </ctls:BusyButton.Style>

</ctls:BusyButton>